/* 基础样式设置 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Microsoft YaHei", sans-serif;
  color: #333333;
  line-height: 1.6;
  background-color: #ffffff;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 头部样式 */
header {
 display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 100px;
  background-color: #003f87; /* 学院主色调 */
  color: #fff;

}

.logo {
  width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo img {
  height: 80px;
}

/* 搜索框样式 - 导航上方 */
.search-area {
  display: flex;
  align-items:center;
}

.search-input {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  color: #333;
  outline: none;
  background-color: #e0e0e0; /* 浅灰色输入框背景 */
}

.search-btn {
  background-color: #e0e0e0; /* 按钮背景与输入框一致 */
  border: 1px solid #ccc;
  border-left: none;
  border-radius: 0 4px 4px 0;
  padding: 0 10px;
  cursor: pointer;
}

.search-btn i {
  color: #666; /* 搜索图标颜色 */
}

/* 导航样式 */
nav {
  background-color: #003f87;
}

nav>ul {
  width: 1200px;
  margin: 0 auto;
  display: flex;
  position: relative;
}

nav>ul>li {
  position: relative;
}

/*导航字体样式*/
nav>ul>li>a {
  display: block;
  padding: 0 12px;
  height: 50px;
  width: 100px;
  line-height: 50px;

  color: #ffffff;
  font-size: 18px;
}

nav>ul>li>a:hover {
  background-color: #0052a3;
}

/* 下拉菜单 */
nav ul ul {
  position: absolute;
  top: 50px;
  left: 0;
  width: 180px;
  background-color: #045dc7;
  display: none;
  z-index: 999;
}

nav ul li:hover ul {
  display: block;
}

nav ul ul li a {
  display: block;
  padding: 10px 20px;
  color: #ffffff;
  font-size: 15px;
}

nav ul ul li a:hover {
  background-color: #003f87;
}

/* 主内容区样式 */
main {
  width: 1200px;
  margin: 20px auto;
  display: grid; /* 采用网格布局，修复模块错位 */
   grid-template-columns:  1fr 1fr; /* 两列等宽 */
  grid-template-rows: auto auto;
  gap: 20px; /* 模块间距 */
}

/* 轮播图样式 */
section[aria-label="轮播图"] {
  grid-column: 1 / -1; /* 轮播图跨两列，占满宽度 */
  width: 100%;
  height: 400px;
  overflow: hidden;
  position: relative;
  margin-bottom: 30px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

section[aria-label="轮播图"] ul {
  display: flex;
  width: 500%;
  height: 100%;
  animation: carousel 20s infinite;
}

section[aria-label="轮播图"] li {
  width: 20%;
  height: 100%;
}

section[aria-label="轮播图"] img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes carousel {
  0% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-20%);
  }

  45% {
    transform: translateX(-20%);
  }

  50% {
    transform: translateX(-40%);
  }

  70% {
    transform: translateX(-40%);
  }

  75% {
    transform: translateX(-60%);
  }

  95% {
    transform: translateX(-60%);
  }

  100% {
    transform: translateX(-80%);
  }
}
.news-notice-container {
  display: flex;                    /* 启用弹性布局 */
  gap: 40px;                        /* 两栏之间的间距 */
  width: 1200px;
  margin: 20px auto;
}
/* 学院新闻（左栏，带配图） */
.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 2px solid #004b93;
  padding-bottom: 8px;
}
.news-section .section-header img[alt="新闻"] {
  width: 30px;
  height: auto;
  vertical-align: middle;
  margin-right: 8px;
}
.section-header span {
  font-size: 16px;
  font-weight: bold;
  color: #004b93;
}
.section-header .more {
  margin-left: auto;
  color: #004b93;
  font-size: 14px;
}
.news-content {
  display: flex;
  gap: 20px;
}
.news-img {
  width: 30%;
}
.news-list {
  width: 70%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.news-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #eee;
  padding-bottom: 10px;
}
.news-list li span {
  color: #999;
  font-size: 16px;
}

/* 通知公告（右栏，蓝色日期块） */

.notice-section .section-header img[alt="通知"] {
  width: 30px;
  height: auto;
  vertical-align: middle;
  margin-right: 8px;
}
.notice-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.notice-list li {
  display: flex;
}
.notice-date {
  display: flex;
  flex-direction: column; /* 如果需要垂直排列，请保留此项；否则删除或改为row */
  justify-content: center;
  width: 60px;
  margin-right: 10px;
  text-align: center;
}

.date-year, .date-day {
  display: inline-block; /* 确保两个元素在同一行 */
  width: 100%; /* 使它们占据父容器的整个宽度 */
  box-sizing: border-box; /* 包括内边距和边框在内的元素总宽度和高度 */
  color: #FFFFFF;
}

.date-year {
  font-size: 16px;
  font-weight: bold;
  padding: 5px 0;
  background-color: #014089; /* 如果希望背景色仅应用于年份，可以放在这里 */
}

.date-day {
  font-size: 16px;
  padding: 3px 0;
  background-color: #0066cc;
}

/* 专题网站+功能入口（第二行分栏） */
.topic-function-row {
  grid-column: 1 / 3;
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
/* 专题网站头部的图标图片样式 */
.topic-section .section-header img[alt="专题"] {
  width: 30px; 
  height: auto;
  vertical-align: middle; 
  margin-right: 8px; 
}
.topic-section {
  width: 65%;
}
.topic-list {
  display: flex;
  gap: 10px;
}
.topic-list img {
  width: 30%;
}
.function-section {
  width: 32%;
}
.function-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.function-item {
  width: 30%;
  text-align: center;
  margin-bottom: 15px;
  color: #666;
  font-size: 14px;
}
.function-item i {
  width: 40px;
  height: 40px;
  margin: 0 auto 5px;
  background-color: #ddd;
}
/* =============== 底部 Footer =============== */
footer {
    background-color: #004b93;
    color: #fff;
    padding: 40px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}

footer .icons img {
    height: 80px;
    margin-right: 20px;
    display: inline-block;
}

footer .content {
    text-align: center;
}

footer .content p {
    margin: 5px 0;
    font-size: 12px;
}

footer .qr-code img {
    height: 80px;
}